package redis;

import redis.clients.jedis.Jedis;

/**
 * @author sjw
 * @description
 * @date 2019-09-30 上午10:14
 */
public class Subscribe {
    public static void main(String[] args) {
        for (int i=0 ;i<100;i++) {
            System.out.println(i);
            new Thread(()->{Jedis jedis = new Jedis("192.168.10.66", 6379);
                //String res= jedis.set("2","1","NX","EX",10);
//        System.out.println(res);
                //String value = jedis.get("2");
                //System.out.println(value);
                jedis.subscribe(new SubscribeClient(), "sjw");}).start();

        }
//        jedis.subscribe(new SubscribeClient(), "sjw1");
    }


}
